package com.atguigu.gmall.sms.api;

import com.atguigu.gmall.common.bean.ResponseVo;
import com.atguigu.gmall.sms.vo.ItemSaleVo;
import com.atguigu.gmall.sms.vo.SkuSaleVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

// sms 模块对外暴露的feign接口，需要保存营销信息直接调用此接口
public interface GmallSmsApi {

    @PostMapping("sms/skubounds/sku/save")
    public ResponseVo saleSave(@RequestBody SkuSaleVo skuSaleVo);

    @GetMapping("sms/skubounds/sku/{skuId}")
    @ApiOperation("根据skuId 查询所有的营销信息  三表一起查")
    public ResponseVo<List<ItemSaleVo>> queryItemSaleBySkuId(@PathVariable("skuId")Long skuId);
}
